package com.example.smartcommunity.com.example.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.example.smartcommunity.GeXingSettingActivity;
import com.example.smartcommunity.R;
import com.example.smartcommunity.ShezhiActivity;
import com.example.smartcommunity.WdfwddActivity;
import com.example.smartcommunity.WodedizhiActivity;
import com.example.smartcommunity.WodefangketongxingActivity;
import com.example.smartcommunity.WodehudongActivity;
import com.example.smartcommunity.WodekuaidiActivity;

public class MyFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.layout_wode, container, false);
        TextView Wodekuaidi=view.findViewById(R.id.wodekuaidi);
        TextView Wdfktx=view.findViewById(R.id.wdfkjl);
        TextView Wdfwdd=view.findViewById(R.id.tvwdfwdd);
        TextView Wdhd=view.findViewById(R.id.wdhd);
        TextView Wodedizhi=view.findViewById(R.id.wodedizhi);
        TextView sz=view.findViewById(R.id.sz);
        TextView tv_gesetting = view.findViewById(R.id.tv_gesetting);

        Wdfktx.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Toast.makeText(getContext() , "点击" , Toast.LENGTH_SHORT).show();
                Intent intent = new Intent(getContext() , WodefangketongxingActivity.class);
                startActivity(intent);
            }
        });

        Wdfwdd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(getContext() , WdfwddActivity.class);
                startActivity(intent);
            }
        });
        Wdhd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(getContext() , WodehudongActivity.class);
                startActivity(intent);
            }
        });


        Wodedizhi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(getContext() , WodedizhiActivity.class);
                startActivity(intent);
            }
        });


        sz.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(getContext() , ShezhiActivity.class);
                startActivity(intent);
            }
        });
        Wodekuaidi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(getContext() , WodekuaidiActivity.class);
                startActivity(intent);
            }
        });

        tv_gesetting.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getContext() , GeXingSettingActivity.class);
                startActivity(intent);
            }
        });

        return view;
    }
}